FROM frolvlad/alpine-oraclejdk8

ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH
RUN mkdir -p "$CATALINA_HOME"
WORKDIR $CATALINA_HOME

ADD . /tmp/build
        #构建应用

RUN set -x \
        && cd /tmp/build \
        #拷贝编译结果到指定目录
        && mv system/target/*.jar $CATALINA_HOME/system.jar \
        #清理编译痕迹
        && cd / && rm -rf /tmp/build \
        && ln -sf /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime
EXPOSE 10086
CMD java -jar system.jar --server.port=10086 --spring.profiles.active=test

